package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchPressureDropMapper;
import com.ruoyi.system.domain.DispatchPressureDrop;
import com.ruoyi.system.service.IDispatchPressureDropService;

/**
 * 压降分析Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchPressureDropServiceImpl implements IDispatchPressureDropService 
{
    @Autowired
    private DispatchPressureDropMapper dispatchPressureDropMapper;

    /**
     * 查询压降分析
     * 
     * @param pressureDropId 压降分析主键
     * @return 压降分析
     */
    @Override
    public DispatchPressureDrop selectDispatchPressureDropByPressureDropId(Long pressureDropId)
    {
        return dispatchPressureDropMapper.selectDispatchPressureDropByPressureDropId(pressureDropId);
    }

    /**
     * 查询压降分析列表
     * 
     * @param dispatchPressureDrop 压降分析
     * @return 压降分析
     */
    @Override
    public List<DispatchPressureDrop> selectDispatchPressureDropList(DispatchPressureDrop dispatchPressureDrop)
    {
        return dispatchPressureDropMapper.selectDispatchPressureDropList(dispatchPressureDrop);
    }

    /**
     * 新增压降分析
     * 
     * @param dispatchPressureDrop 压降分析
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchPressureDrop(DispatchPressureDrop dispatchPressureDrop)
    {
        return dispatchPressureDropMapper.insertDispatchPressureDrop(dispatchPressureDrop);
    }

    /**
     * 修改压降分析
     * 
     * @param dispatchPressureDrop 压降分析
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchPressureDrop(DispatchPressureDrop dispatchPressureDrop)
    {
        return dispatchPressureDropMapper.updateDispatchPressureDrop(dispatchPressureDrop);
    }

    /**
     * 批量删除压降分析
     * 
     * @param pressureDropIds 需要删除的压降分析主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPressureDropByPressureDropIds(Long[] pressureDropIds)
    {
        return dispatchPressureDropMapper.deleteDispatchPressureDropByPressureDropIds(pressureDropIds);
    }

    /**
     * 删除压降分析信息
     * 
     * @param pressureDropId 压降分析主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPressureDropByPressureDropId(Long pressureDropId)
    {
        return dispatchPressureDropMapper.deleteDispatchPressureDropByPressureDropId(pressureDropId);
    }
}
